﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UC_Menu.ascx.cs" Inherits="Manager_Menu_Controls_UC_Menu" %>
<div id="TitleRight">
    <div id="Breadcrumb">
        <ul>
            <li><a href="/Menu/Menu.aspx">Menu</a></li>
            <li>Xem menu</li>
        </ul>
    </div>
</div>
<div class="nav_tabs">
    <ul>
        <li>
            <div class="Selected">
                <a href="../Menu/Menu.aspx">Xem Menu</a></div>
        </li>
        <li>
            <div class="Unselected">
                <a href="../Menu/Themmenu.aspx">Thêm Menu</a></div>
        </li>
    </ul>
</div>
<div class="Clear">
    <br />
</div>  
<div class="description"> 
    <p>Bạn có thể thêm menu trong mục này</p>
</div>
<asp:Label ID="lbVitri" runat="server" Text="Vị trí đặt menu:  "> 
                                <asp:DropDownList ID="drlVitri" runat="server" 
                                    onselectedindexchanged="drlVitri_SelectedIndexChanged" AutoPostBack="True">
                                    <asp:ListItem Text="1" Value="1" />
                                    <asp:ListItem Text="2" Value="2" />
                                </asp:DropDownList>
                         </asp:Label>
<div class="Content1Right-main">
<asp:GridView ID="GV1" runat="server" BackColor="White" 
    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
    AutoGenerateColumns="False" Width="780px" onrowcommand="GV1_RowCommand">
    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="White" 
        BorderColor="Black" BorderStyle="Double" BorderWidth="1px" />
    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
    <RowStyle BackColor="White" ForeColor="Black" />
    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
    <SortedAscendingCellStyle BackColor="#EDF6F6" />
    <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
    <SortedDescendingCellStyle BackColor="#D6DFDF" />
    <SortedDescendingHeaderStyle BackColor="#002876" />
    <Columns>
        <asp:TemplateField HeaderText="Tên Menu">
            <ItemTemplate>
                <asp:Label ID="lbTenMenu" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Đường dẫn">
            <ItemTemplate>
                <asp:Label ID="lbLink" runat="server" Text='<%#Eval("Link") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Hình ảnh" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <img src="<%#String.Format("../../Images/{0}",Eval("Img"))%>" alt="" width="20px" height="20px" />
                <%--<asp:Image ID="lbHinhanh" runat="server" ImageUrl='<%#Eval("Image") %>'/>--%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trạng thái" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="lbTrangthai" runat="server" Text='<%#trangthai(bool.Parse(Eval("Status").ToString()))%>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Hành động" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Button ID="btnSua" runat="server" Text="Sửa" CommandArgument='<%#Eval("Id") %>' CommandName="Sua1" />
                <asp:Button ID="btnXoa" runat="server" Text="Xóa" CommandArgument='<%#Eval("Id") %>' CommandName="Xoa1" OnClientClick="return confirm('Bạn có chắc muốn xóa menu này không?');" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<asp:GridView ID="GV2" runat="server" BackColor="White" 
    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
    AutoGenerateColumns="False" Width="780px" Visible="False" 
        RowStyle-HorizontalAlign="NotSet" onrowcommand="GV2_RowCommand1">
    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="White" 
        BorderColor="Black" BorderStyle="Double" BorderWidth="1px" />
    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
    <RowStyle BackColor="White" ForeColor="Black" />
    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
    <SortedAscendingCellStyle BackColor="#EDF6F6" />
    <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
    <SortedDescendingCellStyle BackColor="#D6DFDF" />
    <SortedDescendingHeaderStyle BackColor="#002876" />
    <Columns>
        <asp:TemplateField HeaderText="ID" HeaderStyle-HorizontalAlign="NotSet" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="lbID" runat="server" Text='<%#Eval("Id") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tên Menu">
            <ItemTemplate>
                <asp:Label ID="lbTenMenu" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Đường dẫn">
            <ItemTemplate>
                <asp:Label ID="lbLink" runat="server" Text='<%#Eval("Link") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ID Menu Cha" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%#Eval("Parent_Id") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trạng thái" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="lbTrangthai" runat="server" Text='<%#trangthai(bool.Parse(Eval("Status").ToString())) %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Hành động" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Button ID="btnSua" runat="server" Text="Sửa" CommandArgument='<%#Eval("Id") %>' CommandName="Sua2" />
                <asp:Button ID="btnXoa" runat="server" Text="Xóa" CommandArgument='<%#Eval("Id") %>' CommandName="Xoa2" OnClientClick="return confirm('Bạn có chắc muốn xóa menu này không?');" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
</div>
